module Base
{
	model fhqW140MZBase
	{
		mesh = vehicles/vehicle_fhq_MZ_w140|fhqW140,
		shader = vehicle_multiuv,
		invertX = FALSE,
		scale = 0.47,
	}
	model fhqW140MZExh
	{
		mesh = vehicles/vehicle_fhq_MZ_w140|fhqW140Exh_Stock,
		shader = vehicle_multiuv,
		invertX = FALSE,
		scale = 0.47,
	}
	model fhqW140MZPlateR
	{
		mesh = vehicles/vehicle_fhq_MZ_w140|fhqW140_PlateR,
		shader = vehicle_multiuv,
		invertX = FALSE,
		scale = 0.47,
	}
	
	template vehicle fhqMZ_W140_Col
	{
		useChassisPhysicsCollision = false,

		physics box
		{
			offset = 0.0000 0.1868 0.0000,
			extents = 0.8791 0.3626 2.3736,
			rotate = 0.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.3022 -0.2252,
			extents = 0.8791 0.5934 0.6484,
			rotate = 0.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.3791 0.2865,
			extents = 0.8791 0.1758 0.5495,
			rotate = 32.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.3765 -0.7863,
			extents = 0.8791 0.6264 0.1868,
			rotate = 63.0000 0.0000 0.0000,
		}
		
	}
	
	template vehicle fhqMZ_W140
	{
		mechanicType = 3,
		offRoadEfficiency = 0.8,
		engineRepairLevel = 5,
		playerDamageProtection = 0.7,

		model
		{
			file = fhqW140MZBase,
			scale = 1.8200,
			offset = 0.0000 -0.0220 0.0714,
		}

		spawnOffsetY = 0.12999995,

		extents = 0.8901 0.5824 2.3846,
		mass = 950,
		physicsChassisShape = 0.8901 0.5824 2.3846,
		centerOfMassOffset = 0.0000 0.2967 0.0000,
		shadowExtents = 0.8992 2.5058,
		shadowOffset = 0.0000 0.0000,
		engineForce = 4150,
		engineLoudness = 70,
		engineQuality = 85,
		maxSpeed = 100f,
		gearRatioCount = 4,
		stoppingMovementForce = 2.0f,
		rollInfluence = 0.7f,
		steeringIncrement = 0.04,
		steeringClamp = 0.3,
		suspensionStiffness = 30,
		suspensionCompression = 2.0,
		suspensionDamping = 2.2,
		maxSuspensionTravelCm = 15,
		suspensionRestLength = 0.3f,
		wheelFriction = 1.8f,
		frontEndHealth = 150,
		rearEndHealth = 150,
		seats = 4,

		wheel FrontLeft
		{
			front = true,
			offset = 0.3681 0.0165 0.7088,
			radius = 0.15f,
			width = 0.30f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.3681 0.0165 0.7088,
			radius = 0.15f,
			width = 0.30f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.3681 0.0165 -0.7198,
			radius = 0.15f,
			width = 0.30f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.3681 0.0165 -0.7198,
			radius = 0.15f,
			width = 0.30f,
		}

		template = PassengerSeat4,

		passenger FrontLeft
		{
			position inside
			{
				offset = 0.1538 0.2143 -0.0934,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 0.5989 -0.1484 -0.0989,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			position inside
			{
				offset = -0.1538 0.2143 -0.0934,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -0.5989 -0.1484 -0.0989,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

		passenger RearLeft
		{
			position inside
			{
				offset = 0.1593 0.2143 -0.5385,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 0.5989 -0.1484 -0.5110,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearLeft,
			}
		}

		passenger RearRight
		{
			position inside
			{
				offset = -0.1593 0.2143 -0.5385,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -0.5989 -0.1484 -0.5055,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearRight,
			}
		}

		area Engine
		{
			xywh = 0.0000 1.4066 0.8901 0.4286,
		}

		area TruckBed
		{
			xywh = 0.0000 -1.4066 0.8901 0.4286,
		}

		area SeatFrontLeft
		{
			xywh = 0.6923 0.1703 0.4945 0.4945,
		}

		area SeatFrontRight
		{
			xywh = -0.6923 0.1703 0.4945 0.4945,
		}

		area SeatRearLeft
		{
			xywh = 0.6923 -0.3407 0.4945 0.4945,
		}

		area SeatRearRight
		{
			xywh = -0.6923 -0.3407 0.4945 0.4945,
		}

		area GasTank
		{
			xywh = -0.6703 -0.7033 0.4505 0.4505,
		}

		area TireFrontLeft
		{
			xywh = 0.6703 0.7802 0.4505 0.4505,
		}

		area TireFrontRight
		{
			xywh = -0.6703 0.7802 0.4505 0.4505,
		}

		area TireRearLeft
		{
			xywh = 0.6703 -0.6319 0.4505 0.4505,
		}

		area TireRearRight
		{
			xywh = -0.6703 -0.6319 0.4505 0.4505,
		}

		template = TrunkDoor,

		part TrunkDoor
		{
			anim Open
			{
				sound = VehicleTrunkOpenSportsCar,
			}

			anim Close
			{
				sound = VehicleTrunkCloseSportsCar,
			}

			anim Lock
			{
				sound = LockVehicleDoorSportsCar,
			}

			anim Unlock
			{
				sound = UnlockVehicleDoorSportsCar,
			}

			anim IsLocked
			{
				sound = VehicleDoorIsLockedSportsCar,
			}

			table install
			{
				recipes = Advanced Mechanics,
			}

			table uninstall
			{
				recipes = Advanced Mechanics,
			}

			model Default
			{
				file = fhqW140MZPlateR,
			}
		}

		template = Trunk/part/TruckBed,

		part TruckBed
		{
			itemType = Base.BigTrunk,
		}

		template = Seat/part/SeatFrontLeft,
		template = Seat/part/SeatFrontRight,
		template = Seat/part/SeatRearLeft,
		template = Seat/part/SeatRearRight,

		part Seat*
		{
			table install
			{
				skills = Mechanics:2,
				recipes = Advanced Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:2,
				recipes = Advanced Mechanics,
			}
		}

		template = GloveBox,

		part GloveBox
		{
			model FrontPlate
			{
				file = fhqW140MZPlateF,
			}
		}

		template = GasTank,

		part GasTank
		{
			install
			{
				recipes = Advanced Mechanics,
			}

			uninstall
			{
				recipes = Advanced Mechanics,
			}
		}

		template = Battery,
		template = Engine,
		template = Muffler,

		part Muffler
		{
			model Default
			{
				file = fhqW140MZExh,
			}

			table install
			{
				recipes = Advanced Mechanics,
			}

			table uninstall
			{
				recipes = Advanced Mechanics,
			}
		}

		template = EngineDoor,

		part EngineDoor
		{
			anim Open
			{
				sound = VehicleHoodOpenSportsCar,
			}

			anim Close
			{
				sound = VehicleHoodCloseSportsCar,
			}

			table install
			{
				recipes = Advanced Mechanics,
			}

			table uninstall
			{
				recipes = Advanced Mechanics,
			}

			model Default
			{
				file = fhqW140MZHoodBadge,
			}
		}

		part Heater
		{
			category = engine,

			lua
			{
				update = Vehicles.Update.Heater,
			}
		}

		part PassengerCompartment
		{
			category = nodisplay,

			lua
			{
				update = Vehicles.Update.PassengerCompartment,
			}
		}

		template = Windshield/part/Windshield,

		part Windshield
		{
			model Default
			{
				file = fhqW140MZWipers,
			}
		}

		template = Windshield/part/WindshieldRear,

		part Windshield*
		{
			table install
			{
				recipes = Advanced Mechanics,
			}

			table uninstall
			{
				recipes = Advanced Mechanics,
			}
		}

		template = Window/part/WindowFrontLeft,
		template = Window/part/WindowFrontRight,
		template = Window/part/WindowRearLeft,
		template = Window/part/WindowRearRight,

		part Window*
		{
			anim Open
			{
				sound = VehicleWindowElectricOpen,
			}

			anim Close
			{
				sound = VehicleWindowElectricClose,
			}

			table install
			{
				recipes = Advanced Mechanics,
			}

			table uninstall
			{
				recipes = Advanced Mechanics,
			}
		}

		template = Door/part/DoorFrontLeft,

		part DoorFrontLeft
		{
			model Default
			{
				file = fhqW140MZMirrorL,
			}
		}

		template = Door/part/DoorFrontRight,

		part DoorFrontRight
		{
			model Default
			{
				file = fhqW140MZMirrorR,
			}
		}

		template = Door/part/DoorRearLeft,
		template = Door/part/DoorRearRight,

		part Door*
		{
			anim Open
			{
				sound = VehicleDoorOpenSportsCar,
			}

			anim Close
			{
				sound = VehicleDoorCloseSportsCar,
			}

			anim Lock
			{
				sound = LockVehicleDoorSportsCar,
			}

			anim Unlock
			{
				sound = UnlockVehicleDoorSportsCar,
			}

			anim IsLocked
			{
				sound = VehicleDoorIsLockedSportsCar,
			}

			table install
			{
				recipes = Advanced Mechanics,
			}

			table uninstall
			{
				recipes = Advanced Mechanics,
			}
		}

		template = Tire,

		part TireFrontLeft
		{
			model InflatedTirePlusWheel
			{
				file = fhqLexusLS400WheelLeft,
			}
		}

		part TireFrontRight
		{
			model InflatedTirePlusWheel
			{
				file = fhqLexusLS400WheelRight,
			}
		}

		part TireRearLeft
		{
			model InflatedTirePlusWheel
			{
				file = fhqLexusLS400WheelLeft,
			}
		}

		part TireRearRight
		{
			model InflatedTirePlusWheel
			{
				file = fhqLexusLS400WheelRight,
			}
		}

		template = Brake,

		part BrakeFrontLeft
		{
			model Default
			{
				file = fhqMZ_BrakeL,
				offset = 0.3681 0.0165 0.7088,
			}
		}

		part BrakeFrontRight
		{
			model Default
			{
				file = fhqMZ_BrakeR,
				offset = -0.3681 0.0165 0.7088,
			}
		}

		part BrakeRearLeft
		{
			model Default
			{
				file = fhqMZ_BrakeL_PadR,
				offset = 0.3681 0.0165 -0.7198,
				rotate = 0.0000 180.0000 0.0000,
			}
		}

		part BrakeRearRight
		{
			model Default
			{
				file = fhqMZ_BrakeR_PadR,
				offset = -0.3681 0.0165 -0.7198,
				rotate = 0.0000 180.0000 0.0000,
			}
		}

		part Brake*
		{
			table install
			{
				recipes = Advanced Mechanics,
			}

			table uninstall
			{
				recipes = Advanced Mechanics,
			}
		}

		template = Suspension,

		part SuspensionFrontLeft
		{
			model Default
			{
				file = fhqMZ_SuspL,
				offset = 0.3681 0.0165 0.7088,
			}
		}

		part SuspensionFrontRight
		{
			model Default
			{
				file = fhqMZ_SuspR,
				offset = -0.3681 0.0165 0.7088,
			}
		}

		part SuspensionRearLeft
		{
			model Default
			{
				file = fhqMZ_SuspL,
				offset = 0.3681 0.0165 -0.7198,
			}
		}

		part SuspensionRearRight
		{
			model Default
			{
				file = fhqMZ_SuspR,
				offset = -0.3681 0.0165 -0.7198,
			}
		}

		part Suspension*
		{
			table install
			{
				recipes = Advanced Mechanics,
			}

			table uninstall
			{
				recipes = Advanced Mechanics,
			}
		}

		template = Radio,
		template = Headlight,
		
		template! = fhqMZ_W140_Col,

		attachment trailer
		{
			offset = 0.0000 0.1484 -1.2637,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = -1.0000,
		}

		attachment trailerfront
		{
			offset = 0.0000 0.1264 1.1154,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = 1.0000,
		}
	}
	template vehicle fhqMZ_W140_300SD
	{
		template! = fhqMZ_W140,
		
		engineRPMType = van,
		
		model
		{
			file = fhqW140MZBase,
			scale = 1.8200,
			offset = 0.0000 -0.0220 0.0714,
		}

		textureMask = Vehicles/vehicle_fhqMZ_W140_mask,
		textureLights = Vehicles/vehicle_fhqMZ_W140_lights,
		textureDamage1Overlay = Vehicles/Veh_Blood_Mask,
		textureDamage2Overlay = Vehicles/Veh_Blood_Hvy,
		textureDamage1Shell = Vehicles/Veh_Damage1,
		textureDamage2Shell = Vehicles/Veh_Damage2,
		textureRust = Vehicles/Veh_Rust,

		sound
		{
			engine = VehicleEngineOffRoad,
			engineStart = VehicleEngineOffRoad,
			engineTurnOff = VehicleEngineOffRoad,
			horn = VehicleHornSportsCar,
			ignitionFail = VehicleIgnitionFailOffRoad,
		}
		
		mass = 930,
	}
	vehicle fhqW140_300SD
	{
		template! = fhqMZ_W140_300SD,

		skin
		{
			texture = Vehicles/vehicle_fhqMZ_W140_shell,
		}

		skin
		{
			texture = Vehicles/vehicle_fhqMZ_W140_2_shell,
		}

		skin
		{
			texture = Vehicles/vehicle_fhqMZ_W140_3_shell,
		}

		extents = 0.8901 0.5824 2.3846,
		physicsChassisShape = 0.8901 0.5824 2.3846,
		centerOfMassOffset = 0.0000 0.2967 0.0000,
		shadowExtents = 0.8992 2.5058,
		shadowOffset = 0.0000 0.0000,
		engineLoudness = 62,

		wheel FrontLeft
		{
			front = true,
			offset = 0.3681 0.0165 0.7088,
			radius = 0.15f,
			width = 0.30f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.3681 0.0165 0.7088,
			radius = 0.15f,
			width = 0.30f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.3681 0.0165 -0.7198,
			radius = 0.15f,
			width = 0.30f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.3681 0.0165 -0.7198,
			radius = 0.15f,
			width = 0.30f,
		}

		passenger FrontLeft
		{
			position inside
			{
				offset = 0.1538 0.2143 -0.0934,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 0.5989 -0.1484 -0.0989,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			position inside
			{
				offset = -0.1538 0.2143 -0.0934,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -0.5989 -0.1484 -0.0989,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

		passenger RearLeft
		{
			position inside
			{
				offset = 0.1593 0.2143 -0.5385,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 0.5989 -0.1484 -0.5110,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearLeft,
			}
		}

		passenger RearRight
		{
			position inside
			{
				offset = -0.1593 0.2143 -0.5385,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -0.5989 -0.1484 -0.5055,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearRight,
			}
		}

		area Engine
		{
			xywh = 0.0000 1.4066 0.8901 0.4286,
		}

		area TruckBed
		{
			xywh = 0.0000 -1.4066 0.8901 0.4286,
		}

		area SeatFrontLeft
		{
			xywh = 0.6923 0.1703 0.4945 0.4945,
		}

		area SeatFrontRight
		{
			xywh = -0.6923 0.1703 0.4945 0.4945,
		}

		area SeatRearLeft
		{
			xywh = 0.6923 -0.3407 0.4945 0.4945,
		}

		area SeatRearRight
		{
			xywh = -0.6923 -0.3407 0.4945 0.4945,
		}

		area GasTank
		{
			xywh = -0.6703 -0.7033 0.4505 0.4505,
		}

		area TireFrontLeft
		{
			xywh = 0.6703 0.7802 0.4505 0.4505,
		}

		area TireFrontRight
		{
			xywh = -0.6703 0.7802 0.4505 0.4505,
		}

		area TireRearLeft
		{
			xywh = 0.6703 -0.6319 0.4505 0.4505,
		}

		area TireRearRight
		{
			xywh = -0.6703 -0.6319 0.4505 0.4505,
		}

		part TrunkDoor
		{
			model Badges
			{
				file = fhqW140MZBadge_300SD,
				offset = 0.0000 0.0000 0.0000,
				rotate = 0.0000 0.0000 0.0000,
			}
		}

		attachment trailer
		{
			offset = 0.0000 0.1484 -1.2637,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = -1.0000,
		}

		attachment trailerfront
		{
			offset = 0.0000 0.1264 1.1154,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = 1.0000,
		}
	}
}
